import request from '@/utils/request'

export function pageList(params) {
  return request({
    url: '/api/sys/user/pageUser',
    method: 'get',
    params
  })
}

export function getUsersByRole(roleId, params) {
  return request({
    url: '/api/sys/user/getUsersByRole/' + roleId,
    method: 'get',
    params
  })
}

export function getUsersByDept(roleId, params) {
  return request({
    url: '/api/sys/user/getUsersByDept/' + roleId,
    method: 'get',
    params
  })
}

/**
 * 修改密码
 */
export function updatePassword(obj) {
	return request({
		url: '/api/sys/user/updatePassword',
		method: 'put',
		data: obj
	})
}
